//
//  AllFavGroupTableViewCell.m
//  Rail
//
//  Created by huyuchen on 2018/3/21.
//  Copyright © 2018年 Hychen. All rights reserved.
//

#import "AllFavGroupTableViewCell.h"

@interface AllFavGroupTableViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *directionIcon;
@property (weak, nonatomic) IBOutlet UILabel *groupNameLabel;
@property (weak, nonatomic) IBOutlet UIButton *addButton;

@end
@implementation AllFavGroupTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)clickAddButton:(UIButton *)sender {
    if (self.BlockClickAddButton) {
        self.BlockClickAddButton();
    }
}

- (void)setShowAddButton:(BOOL)showAddButton {
    _showAddButton = showAddButton;
    self.addButton.hidden = !showAddButton;
}

- (void)setModel:(AllFavListModel *)model {
    _model = model;
    
    self.groupNameLabel.text = model.dir_name;
}

- (void)setIsExpand:(BOOL)isExpand {
    _isExpand = isExpand;
    self.directionIcon.image = !isExpand?ImageNamed_bb(@"app_collect_subfield_down_ic-1"):ImageNamed_bb(@"app_collect_subfield_right_ic");
}
@end
